<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<c:set var="path" value="..${ctx}/base/power/authority"/>

<div class="pageContent">
	<form method="post" action="${path}/ajaxupdate.html" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
	<input type="hidden" name="tableName" value="bs_role" />
	<input type="hidden" name="table.id.name" value="roleID" />
	<input type="hidden" name="tableAction" value="save" />
	<input type="hidden" name="jspPageName" value="${path}/paging.html?tableName=bs_role&jsp=base/power/role/role_list" />
		<div class="pageFormContent" layoutH="280">
			<fieldset>
				<dl>
					<dt>页编号：</dt>
					<dd><input name="authorityID" type="text" size="30" value="${data.authorityID}" readonly="readonly"/></dd>
				</dl>
				<dl>
					<dt>页名称：</dt>
					<dd><input name="pageName" type="text" size="30" value="${data.pageName}" class="required" /></dd>
				</dl>
				<dl>
					<dt>URL：</dt>
					<dd><input name="url" type="text" size="80" value="${data.url}" /></dd>
				</dl>
				<dl class="nowrap">
					<dt>描述：</dt>
					<dd><input name="description" type="text" size="80" value="${data.description}" /></dd>
				</dl>
				<dl class="nowrap">
					<dt>页工作组可见权限：</dt>
					<dd><input name="visibleGroup" type="text" size="80" value="${data.authorityPage.visibleGroup}" /></dd>
				</dl>
				<dl class="nowrap">
					<dt>页工作组隐藏权限：</dt>
					<dd><input name="hideGroup" type="text" size="80" value="${data.authorityPage.hideGroup}" /></dd>
				</dl>
				<dl class="nowrap">
					<dt>页角色可见权限：</dt>
					<dd>
					<input name="data.authorityPage.roleID" value="" type="hidden" id="visibleRole" />
					<input name="data.authorityPage.roleName" value="" type="text" size="80" readonly="readonly" />
					<a class="btnLook" href="..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list" width="500" lookupGroup="data.authorityPage">查找带回</a>
					</dd>
				</dl>
				<dl class="nowrap">
					<dt>页角色隐藏权限：</dt>
					<dd>
					<input id="123" name="data.authorityPage2.roleID" value="" type="hidden" />
					<input id="234" name="data.authorityPage2.roleName" value="" type="text" size="80" readonly="readonly" />
					<a class="btnLook" href="..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list" width="500" lookupGroup="data.authorityPage2">查找带回</a>
				</dl>
			</fieldset>
		</div>

		<div class="pageFormContent" layoutH="320">
			<div class="tabs">
			<div class="tabsHeader">
				<div class="tabsHeaderContent">
					<ul>
						<li class="selected"><a href="javascript:void(0)"><span>属性权限分配列表</span></a></li>
					</ul>
				</div>
			</div>
			
			<div class="panelBar">
				<ul class="toolBar">
					<li><a class="add" href="${path}/addAuthority.html" width="560" height="440" target="dialog" rel="dlg_page122" mask="true" title="添加属性权限信息"><span>添加</span></a><br /><br /></li>
					<li class="line">line</li>
					<li><a class="edit" href="${path}/edit.html?authorityID={authorityID}" target="dialog" rel="dlg_page11" mask="true" title="修改属性权限信息"><span>修改</span></a></li>
					<li class="line">line</li>
					<li><a class="edit" href="${path}/saveAll.html" target="ajaxTodo" title="修改属性权限信息"><span>保存</span></a></li>
					<li class="line">line</li>
					<li><a class="delete" href="${path}/delete.html?authorityID={authorityID}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
				</ul>
			</div>
			
			<div class="tabsContent" style="height: 180px;">
				<div>
					<table class="table" width="100%">
						<thead>
							<tr>
								<th width="20">属性名称</th>
								<th width="80">属性描述</th>
							</tr>
						</thead>
						<tbody>
							<c:if test="${! empty bean.paramenters }">
							<c:forEach var="data" items="${bean.paramenters}" varStatus="status">
							<tr>
								<td></td>
								<td></td>
							</tr>
							</c:forEach>
							</c:if>
						</tbody>
					</table>
				</div>
			</div>
			</div>
		</div>		

		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
/**
 * dialog上的表单提交回调函数
 * 服务器转回navTabId，可以重新载入指定的navTab. statusCode=DWZ.statusCode.ok表示操作成功, 自动关闭当前dialog
 * form提交后返回json数据结构,json格式和navTabAjaxDone一致
 */
function dialogAjaxDone(json){
	DWZ.ajaxDone(json);
	if (json.statusCode == DWZ.statusCode.ok){
		// alert(json.callbackType);
		if(json.callbackType){
			navTab.reload("${path}/tablenamepaginglist.html?tableName=bs_role&jspPageName=base/power/role/role_list");//刷新
			setTimeout(function(){$.pdialog.closeCurrent();}, 100);
		}
	}
}

function consoultRole(id){
	var url = "..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list";
	alert(url);
	//var str = "#" + id;
	//var aa = $(str);
	//url = url + "?ids=" + aa.val();
	//alert(url);
	//url = "http://localhost:8080/office/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list";
	//alert(url);
	//url = "${path}/tablenamepaginglist.html?tableName=bs_role&jspPageName=base/power/role/role_list";
	//$.pdialog.open(url, "base_define_modify_unit11", title,{width:500,height:460,mask:true,maxable:false,resizable:false});
	//alert($('#123').val());
}
</script>
